import pandas as pd
import pickle


if __name__ == '__main__':
    in_file = '/data/data/category2/20_2019-04-10_autohome_article.pl'
    d: pd.DataFrame = pickle.load(open(in_file, 'rb'))

    cols = ['article_type_1st','article_type_2nd', 'title', 'content']

    for k in d[cols].values.tolist():
        content = k[3].replace('\t', ' ').replace('\0xa0', ' ')
        x = content.split(' ', 1)
        if len(x) == 2:
            x, content = x
        else:
            content = x[0]
            x = ''
        if x == '':
            print(k)


